<template>
  <view class="verulia-layout">
    <uv-navbar :title="navbarTitle" :placeholder="true" auto-back></uv-navbar>
    <view class="verulia-layout__body" :style="{ height: getClientHeight() }">
      <uv-parse :content="content"></uv-parse>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { getClientHeight } from '@/core/utils/verulia'
// 客户端ID
const clientId = import.meta.env.VITE_APP_CLIENT_ID;
const navbarTitle = ref('');
const content = ref(``);
const loading = ref(false);
const type = ref('user')

const getConfig = async () => {
  loading.value = true;
  content.value = type.value === 'user' ? `<p>用户协议<p>` : `<p>隐私协议<p>`
  loading.value = false;
}

onLoad((option) => {
  console.log(option)
  type.value = option.type;
  navbarTitle.value = option.type === 'user' ? '用户协议' : '隐私协议';
  getConfig()
})
</script>

<style lang="scss" scoped></style>
